home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19990422-19990725 / 000021_news@watsun.cc.columbia.edu _Fri Apr 30 17:14:34 1999.msg < prev    next >
Internet Message Format  |  2020-01-01  |  4KB

  1. Return-Path: <news@watsun.cc.columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id RAA22871
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Fri, 30 Apr 1999 17:14:34 -0400 (EDT)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id RAA12018
  7.     for kermit.misc@watsun.cc.columbia.edu; Fri, 30 Apr 1999 17:00:23 -0400 (EDT)
  8. X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
  9. From: jaltman@watsun.cc.columbia.edu (Jeffrey Altman)
  10. Subject: Re: DDE complient
  11. Date: 30 Apr 1999 21:00:21 GMT
  12. Organization: Columbia University
  13. Message-ID: <7gd5l5$bne$1@newsmaster.cc.columbia.edu>
  14. To: kermit.misc@watsun.cc.columbia.edu
  15.  
  16. In article <7gd3gc$d0j$1@nnrp1.dejanews.com>,  <luda@bwsc.org> wrote:
  17. : Frank- We have purchased a Melita auto-dialer system, that need to CUT/PASTE
  18. : an account number from Melita to a VT320 host screen.  I believe the terminal
  19. : emulator need to support either DDE or EHLLAPI. We have Kermit. Will it work?
  20.  
  21. Here is the response we gave Alan Zipkin from Melita last week when he
  22. asked does Kermit 95 support DDE or EHLLAPI:
  23.  
  24.  
  25. No.  K95 does not support either DDE or EHLLAPI at the present time.
  26.  
  27. The reason for not supporting EHLLAPI is that I have never been able
  28. to find a specification for exactly what EHLLAPI is.  If you have one
  29. I would be more than happy to consider implementing it.
  30.  
  31. Is K95 being started from your application or independent of your
  32. application?
  33.  
  34. Since you are working on NT it is possible for you to push keyboard
  35. events into the K95 Window's event queue.
  36.  
  37. #include <windows.h>
  38. #include <stdio.h>
  39.  
  40. int
  41. main( int argc, char * argv[] )
  42. {
  43.     INPUT_RECORD k ;
  44.     KEY_EVENT_RECORD * pKey=&k.Event.KeyEvent;
  45.     DWORD count = 0;
  46.     int rc=0, c, i ;
  47.     HWND hWin = NULL;
  48.     HANDLE hKbd = NULL;
  49.     char title[128];
  50.  
  51.     if ( argc >= 2 ) {
  52.         sprintf(title,"%s - K-95",argv[1]);
  53.     }
  54.     else
  55.         strcpy(title,"K-95");
  56.     hWin = FindWindow(NULL, title);
  57.  
  58.     if ( !hWin ) {
  59.         printf("Unable to find window handle\n");
  60.         return(1);
  61.     }
  62.  
  63.     hKbd = GetStdHandle( STD_INPUT_HANDLE ) ;
  64.  
  65.     while ( 1 ) {
  66.         if ( WAIT_OBJECT_0 == WaitForSingleObject(hKbd,-1) ) {
  67.             rc = ReadConsoleInput( hKbd, &k, 1, &count ) ;
  68.         }
  69.         if ( count &&
  70.              k.EventType == KEY_EVENT &&
  71.              pKey->bKeyDown) {
  72.             PostMessage(hWin,
  73.                          WM_KEYDOWN,
  74.                          pKey->wVirtualKeyCode,
  75.                          (pKey->dwControlKeyState & ENHANCED_KEY?1:0)<<24 |
  76.                          pKey->wVirtualScanCode << 16 |
  77.                          1
  78.                          );
  79.             PostMessage(hWin,
  80.                          WM_KEYUP,
  81.                          pKey->wVirtualKeyCode,
  82.                          1 << 31 |
  83.                          1 << 30 |
  84.                          (pKey->dwControlKeyState & ENHANCED_KEY?1:0)<<24 |
  85.                          pKey->wVirtualScanCode << 16 |
  86.                          1
  87.                          );
  88.         }
  89.     }
  90.  
  91.     return(0);
  92. }
  93.  
  94.  
  95.     Jeffrey Altman * Sr.Software Designer * Kermit-95 for Win32 and OS/2
  96.                  The Kermit Project * Columbia University
  97.               612 West 115th St #716 * New York, NY * 10025
  98.   http://www.kermit-project.org/k95.html * kermit-support@kermit-project.org